package demo.email;

import act.controller.annotation.UrlContext;
import act.event.EventBus;
import act.util.LogSupport;
import org.osgl.mvc.annotation.PostAction;

import javax.inject.Inject;

@UrlContext("/users")
public class UserService extends LogSupport {

    @Inject
    private EventBus eventBus;

    @PostAction
    public void signUp(User user) {
        eventBus.triggerAsync(PostOffice.EVENT_USER_SIGN_UP, user);
        //postOffice.sendWelcomeLetter(user);
        info("user sign up handled");
    }

}
